<template>
	<view class="main">
		<view class="content">
			<!-- <view class="item u-border-bottom" v-for="(item, index) in list" :key="index" @click="to(item)">
				<image src="../../static/logo.png" mode="aspectFill" class="newImg"></image>
				<view class="infos">
					<view class="info-txt">
						这里是标题这里是标题这里是标题这里是标题这里是标题这里是标题这里是标题
					</view>
					<view class="info-time">
						2020-10-06 22:21:00
					</view>
				</view>
				<u-icon name="arrow-right" color="#ccc"></u-icon>
			</view>
			<u-loadmore :status="status" /> -->
		</view>
		<view class="noData">
			<u-empty text="暂无数据" mode="data"></u-empty>
		</view>
		<Nav :current='navActive'></Nav>
	</view>
</template>

<script>
	import Nav from '../../component/Nav.vue'
	export default {
		components: {
			Nav
		},
		data() {
			return {
				status: 'loadmore',
				list: 15,
				page: 0,
				navActive: 3,
			}
		},
		onReachBottom() {
			if (this.page >= 3) return;
			this.status = 'loading';
			this.page = ++this.page;
			setTimeout(() => {
				this.list += 10;
				if (this.page >= 3) this.status = 'nomore';
				else this.status = 'loading';
			}, 2000)
		},
		onLoad() {

		},
		onShow() {

		},
		methods: {
			to(i) {
				uni.navigateTo({
					url: './newsInfo/newsInfo?id=' + i
				});
			}
		}
	}
</script>

<style>
	.content {
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
		width: 100%;
	}

	.logo {
		height: 200rpx;
		width: 200rpx;
		margin-top: 200rpx;
		margin-left: auto;
		margin-right: auto;
		margin-bottom: 50rpx;
	}

	.text-area {
		display: flex;
		justify-content: center;
	}

	.title {
		font-size: 36rpx;
		color: #8f8f94;
	}

	.wrap {
		padding: 24rpx;
	}

	.item {
		width: 100%;
		color: $u-content-color;
		font-size: 28rpx;
		display: flex;
		flex-direction: row;
		justify-content: space-between;
		align-items: center;
		height: 190rpx;
		padding: 14rpx 34rpx;
	}

	.infos {
		flex: 1;
		margin: 0 20rpx;
		display: flex;
		justify-content: space-around;
		flex-direction: column;
		height: 100%;
	}

	.info-txt {
		color: #000000;
		font-weight: 600;
		font-size: 28rpx;
		height: 80rpx;
		line-height: 40rpx;
		overflow: hidden;
		padding: 2rpx 0;
		width: 484rpx;
	}

	.info-time {
		font-size: 22rpx;
		color: #ccc;
	}

	.newImg {
		width: 170rpx;
		height: 120rpx;
		background: #D8D8D8;
		border-radius: 8rpx;
	}
	
</style>
